------------------------------------------------------- MX COBOL (mxc.lst) MX COBOL Version 3.0 - EN, Copyright (c) Vlastimil Cevela 1996, 2006 (20060528) D:\CeW\cobol\p\mx_a3.cb WHEN-COMPILED = 04/06/06 06:29:28 Registered user: 060529 Name, City, Country 0001 * Simple dialog - with "accept" as stop at end mx_a3.cb 0002 * 0003 working-storage section. 0004 77 INP pic x(20). 0005 77 OUT pic x(50) value space. 0006 * 0007 procedure division. 0008 display "Give me your name, please:". 0009 accept INP. | 0004 0010 * 0011 string 0012 "Hello, " delimited size 0013 INP delimited space | 0004 0014 " - have a nice day." delimited size 0015 into OUT. | 0005 0016 * 0017 display OUT. | 0005 0018 accept INP. | 0004 0019 stop run. DATA DIRECTORY: LV NAME OF ITEM ADDR TP LENG LINE REFERENCE 77 INP 0 AN 20 0004 0009 0013 0018 77 OUT 20 AN 50 0005 0015 0017 77 TALLY 72 BI 4 0000 77 NSTD-REELS 76 BI 2 0000 77 WHEN-COMPILED 80 AN 16 0000 ERROR LISTING: line 0003: warning 0002 level 0 (some division/section/paragraph header before WORKING-STORAGE missing - never mind) Errors: 0, warnings: 1 Turbo C Version 2.01 Copyright (c) 1987, 1988 Borland International d:\cew\cobol\p\mx_a3.c: Available memory 352736 Turbo C Version 2.01 Copyright (c) 1987, 1988 Borland International Turbo Link Version 2.0 Copyright (c) 1987, 1988 Borland International Available memory 413700 ------------------------------------------------------- main source C (.c) /* 0001 * Simple dialog - with "accept" as stop at end mx_a3.cb */ /* 0002 * */ /* 0003 working-storage section. */ /* 0004 77 INP pic x(20). */ /* 0005 77 OUT pic x(50) value space. */ /* 0006 * */ /* 0007 procedure division. */ #include "D:\CeW\cobol\p\mx_a3.d" #undef MXPE #define MXPE(x,y) goto x /* MX COBOL - Jan 08 2000, 16:35:41 */ _l0001: /* @@@ */ _f0001( argc, argv ); /*KONEC*/ /************ _() end **************/ ;} ------------------------------------------------------- 1st include C (.d) #include #include #include #include "c:\mxc\mxcsdtf.h" #include "c:\mxc\mxcicb.h" static void lojo(jmp_buf); static void lojo(lj1) jmp_buf lj1; {longjmp(lj1,1);} #define XERNF 0x01 extern jmp_buf ps[]; extern short pk[]; static unsigned char flag=0; /* 0x80 = ON SIZE ERROR, 0x40 = READY TRACE */ static short i0,i1; static short exprog=0; extern long xferr; static unsigned char W[20]={0}; static unsigned char W1[52]={' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' '}; static unsigned char W2[8]={0,0,0,0,0,0}; static unsigned char W3[16]={'0','4','/','0','6','/','0','6','0','6',':', '2','9',':','2','8'}; static void _(int,char**); #define J0 stdout #define J2 stdout #pragma warn -par static short _f0001(int argc, char **argv); #define PK(x) if(pk[x]) lojo(ps[x]) unsigned char icbdisac=0, icbbarvy = 0x07; #define STOPRUN static unsigned char *X,*Y,*Z,*Z1; /* pomocne ukazatele */ static long l0,l1,l2,l3; static double d0,d1,d2,d3; static unsigned char P[33]; /* pracovni pole pro vsechny */ static void _(int,char**); ANONYMUS() {exprog++; _(0,(char **)0L); return 0;} unsigned int _stklen = 6 * 1024; struct sicxh icxh; /**/int main(int argc, char **argv) {icbhe(); _(argc,argv); return 0;} #include "D:\CeW\cobol\p\mx_a3.t" #pragma warn -par static void _(int argc, char **argv) /* toto je preklad PROCEDURE */ { /* konec zdroje .d */ ------------------------------------------------------- 2nd include C (.t) #define MXPE(x,y) return y #pragma warn -par static short _f0001( int argc, char **argv ) { /* 0008 display "Give me your name, please:". */ /* DISPLAY */ fprintf(J0,"Give me your name, please:\n"); /* . */ /* 0009 accept INP. */ /* ACCEPT */ Y=(X=W)+20; while (X